#ifndef __CORRECT_H_H_
#define __CORRECT_H_H_

#include "stdint.h"
#include "dict.h"

#ifdef __cplusplus
extern "C"
{
#endif

	float i16point_list_correct(const dict_i16_type *list, uint16_t list_len, float fval);
	float i32point_list_correct(const dict_i32_type*list, uint16_t list_len, float fval);
	float fpoint_list_correct(const dict_f32_type *list, uint16_t list_len, float fval);

	float dat_remap_i32(const dict_i32_type*list, uint16_t list_len, float in_dat);
	float dat_remap_i16(const dict_i16_type *list, uint16_t list_len, float in_dat);
	float dat_remap_u16(const dict_u16_type *list, uint16_t list_len, float in_dat);
	float dat_remap_f32(const dict_f32_type *list, uint16_t list_len, float in_dat);

	int16_t dat_remap_i16_to_i16(const dict_i16_type *list, uint16_t list_len, int16_t in_dat);
	uint16_t dat_remap_u16_to_u16(const dict_u16_type *list, uint16_t list_len, uint16_t in_dat);

	float dat_remap_2p_i32(const dict_i32_type p1, const dict_i32_type p2, float in_dat);
	float dat_remap_2p_i16(const dict_i16_type p1, const dict_i16_type p2, float in_dat);
	float dat_remap_2p_f32(const dict_f32_type p1, const dict_f32_type p2, float in_dat);

	float dat_remap_2pn_i32(int32_t a1, int32_t a2, int32_t b1, int32_t b2, float in_dat);
	float dat_remap_2pn_i16(int16_t a1, int16_t a2, int16_t b1, int16_t b2, float in_dat);
	float dat_remap_2pn_f32(float a1, float a2, float b1, float b2, float in_dat);
	int16_t dat_remap_2pn_i16_toi(int16_t a1, int16_t a2, int16_t b1, int16_t b2, int16_t in_dat);

#ifdef __cplusplus
}
#endif

#endif 
